package com.hqyj.controller;


import com.hqyj.pojo.Income;
import com.hqyj.service.IIncomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * <p>
 * 收入表 前端控制器
 * </p>
 *
 * @author rock
 * @since 2021-10-21
 */
@RestController
@RequestMapping("/income")
public class IncomeController {
    @Autowired
    IIncomeService incomeService;

    @RequestMapping("/list")
    public HashMap<String,Object> list(Income income){
        System.out.println(income.getIncomeTime());
        return incomeService.selectList(income);
    }

    @RequestMapping("/update")
    public HashMap<String,Object> update(Income income){
        return incomeService.update(income);
    }

    @RequestMapping("/del")
    public HashMap<String,Object> del(Income income){
        return incomeService.del(income);
    }

}

